<template>
  <div class="setting">
    <van-col span="24">
      <x-button class="logout_button" @click.native="logout" type="warn">注销</x-button>
    </van-col>
  </div>
</template>
<script>
import router from '@/router'
import { Cell, CellBox, CellFormPreview, Group, Badge, cookie } from 'vux'
export default {
  data() {
    return {

    }
  },
  components: {
    Cell, CellBox, CellFormPreview, Group, Badge, cookie
  },
  methods: {
    logout() {
      this.$store.state.isLogin = false
      cookie.set('autoLogin', false)
      // cookie.remove('autoLogin')
      // cookie.remove('account')
      // cookie.remove('password')
      router.push({ name: 'Login' })
    }
  }
}
</script>
 <style scoped>
.setting{
  padding-top:44px
}
.logout_button{
  width:80%;
}
 </style>
